#ifndef _EVENT_PARSER_H_
#define _EVENT_PARSER_H_

#include "include/GlobalGameObj.h"

enum Event
{
	Character_GetBaseInfo = 0,
	Character_GetDetailInfo,
	Pet_GetBaseInfo,
	Pet_GetDetailInfo,
};

class EventParser
{
public:
	static void ParseData(GlobalGameObj *p_game_obj);
	static void ProcessSysError(GlobalGameObj *p_game_obj);

private:
	static void ParseFormattedData(GlobalGameObj *p_game_obj);
	static void PostParseData(GlobalGameObj *p_game_obj);
	static int Tree2Buf(int character_id, int format, boost::property_tree::ptree format_tree,
        boost::property_tree::ptree content_tree, char *buf, int &len);
	static void FillPackageHead(Common::PackageHead *p_package_head);
};

typedef void (*EventHandler)(GlobalGameObj *p_game_obj);

#endif
